var vm = new Vue({
    el:'#app',
    data:{
        data:{}
    },
    methods: {
        init:function () {
            $.get("/v/index", function(r){
                vm.data = r.data
            });
        }(),
        toPercent:function (num, total) {
            if (total == 0) {
                return 0
            }
            return (Math.round(num / total * 10000) / 100.00 + "%");// 小数点后两位百分比
        },
    }
});